/*
 * Copyright (c) 2023 iQi.Co.Ltd. All rights reserved.
 */
 
using System.Collections.Generic;
using NetProtocol.POD;
using NetProtocol.Enum;
using IQIGame.Onigao.Game;
using IQIGame.Onigao.GamePlay;
using IQIGame.Onigao.Framework;
using System.Threading.Tasks;
using System;

namespace NetProtocol.Server {
	/// <summary>
	/// 英雄
	/// module : hero
	/// </summary>
	public interface SNetHero : INetServerModule {
		Dictionary<int, MessageHandler> INetServerModule.GetModuleFunction()
        {	
            return new()
            {
                { NetMessageId.hero_upLevel, (session, data) =>
		            {
#if ENABLE_NET_LOG || UNITY_EDITOR
						NetProtocolHelper.ServerLog(NetMessageId.hero_upLevel, "Recv->" + data.ToString());
#endif
		                UpLevelRequest _data = (UpLevelRequest)data;
						return CS_upLevel(session, _data.heroCid, _data.items);
		            } 
            	},
                { NetMessageId.hero_awaken, (session, data) =>
		            {
#if ENABLE_NET_LOG || UNITY_EDITOR
						NetProtocolHelper.ServerLog(NetMessageId.hero_awaken, "Recv->" + data.ToString());
#endif
		                AwakenRequest _data = (AwakenRequest)data;
						return CS_awaken(session, _data.heroCid);
		            } 
            	},
                { NetMessageId.hero_upStar, (session, data) =>
		            {
#if ENABLE_NET_LOG || UNITY_EDITOR
						NetProtocolHelper.ServerLog(NetMessageId.hero_upStar, "Recv->" + data.ToString());
#endif
		                UpStarRequest _data = (UpStarRequest)data;
						return CS_upStar(session, _data.heroCid);
		            } 
            	},
                { NetMessageId.hero_upSkill, (session, data) =>
		            {
#if ENABLE_NET_LOG || UNITY_EDITOR
						NetProtocolHelper.ServerLog(NetMessageId.hero_upSkill, "Recv->" + data.ToString());
#endif
		                UpSkillRequest _data = (UpSkillRequest)data;
						return CS_upSkill(session, _data.heroCid, _data.skillCid);
		            } 
            	},
                { NetMessageId.hero_upFateTrajectory, (session, data) =>
		            {
#if ENABLE_NET_LOG || UNITY_EDITOR
						NetProtocolHelper.ServerLog(NetMessageId.hero_upFateTrajectory, "Recv->" + data.ToString());
#endif
		                UpFateTrajectoryRequest _data = (UpFateTrajectoryRequest)data;
						return CS_upFateTrajectory(session, _data.heroCid);
		            } 
            	},
                { NetMessageId.hero_wearEquip, (session, data) =>
		            {
#if ENABLE_NET_LOG || UNITY_EDITOR
						NetProtocolHelper.ServerLog(NetMessageId.hero_wearEquip, "Recv->" + data.ToString());
#endif
		                WearEquipRequest _data = (WearEquipRequest)data;
						return CS_wearEquip(session, _data.heroCid, _data.slot, _data.equipId);
		            } 
            	},
                { NetMessageId.hero_wearPet, (session, data) =>
		            {
#if ENABLE_NET_LOG || UNITY_EDITOR
						NetProtocolHelper.ServerLog(NetMessageId.hero_wearPet, "Recv->" + data.ToString());
#endif
		                WearPetRequest _data = (WearPetRequest)data;
						return CS_wearPet(session, _data.heroCid, _data.petId);
		            } 
            	},
                { NetMessageId.hero_clearEquip, (session, data) =>
		            {
#if ENABLE_NET_LOG || UNITY_EDITOR
						NetProtocolHelper.ServerLog(NetMessageId.hero_clearEquip, "Recv->" + data.ToString());
#endif
		                ClearEquipRequest _data = (ClearEquipRequest)data;
						return CS_clearEquip(session, _data.heroCid);
		            } 
            	},
            };
        }
        
        Dictionary<int, Func<IReceiveMessage>> INetServerModule.GetModuleRequest() 
        {
	        return new ()
	        {
	        	{NetMessageId.hero_upLevel, ()=> new UpLevelRequest()},
	        	{NetMessageId.hero_awaken, ()=> new AwakenRequest()},
	        	{NetMessageId.hero_upStar, ()=> new UpStarRequest()},
	        	{NetMessageId.hero_upSkill, ()=> new UpSkillRequest()},
	        	{NetMessageId.hero_upFateTrajectory, ()=> new UpFateTrajectoryRequest()},
	        	{NetMessageId.hero_wearEquip, ()=> new WearEquipRequest()},
	        	{NetMessageId.hero_wearPet, ()=> new WearPetRequest()},
	        	{NetMessageId.hero_clearEquip, ()=> new ClearEquipRequest()},
	        };
	    }
        
#region Server-side Interface
		/// <summary>
        ///  升级
        /// </summary>
	    protected UpLevelResult CS_upLevel(ISession session, int heroCid, Dictionary<int, int> items);
		/// <summary>
        ///  觉醒
        /// </summary>
	    protected AwakenResult CS_awaken(ISession session, int heroCid);
		/// <summary>
        ///  升星
        /// </summary>
	    protected UpStarResult CS_upStar(ISession session, int heroCid);
		/// <summary>
        ///  升级技能
        /// </summary>
	    protected UpSkillResult CS_upSkill(ISession session, int heroCid, int skillCid);
		/// <summary>
        ///  升级命轨
        /// </summary>
	    protected UpFateTrajectoryResult CS_upFateTrajectory(ISession session, int heroCid);
		/// <summary>
        ///  穿戴装备，0表示脱下
        /// </summary>
	    protected WearEquipResult CS_wearEquip(ISession session, int heroCid, int slot, long equipId);
		/// <summary>
        ///  穿戴宠物，0表示脱下
        /// </summary>
	    protected WearPetResult CS_wearPet(ISession session, int heroCid, long petId);
		/// <summary>
        ///  脱下所有装备--含宠物
        /// </summary>
	    protected ClearEquipResult CS_clearEquip(ISession session, int heroCid);
#endregion
#region Client-side Interface
		/// <summary>
        ///  升级结果，成功时替换
        /// </summary>
        public UpLevelResult SC_upLevelResult(Task<UpLevelResult> future){return new UpLevelResult(future);}
        public UpLevelResult SC_upLevelResult(int code, HeroPOD heroPOD){return new UpLevelResult(code, heroPOD);}
        public UpLevelResult SC_upLevelResult(int code){return new UpLevelResult(code);}
		/// <summary>
        ///  觉醒结构，成功时替换
        /// </summary>
        public AwakenResult SC_awakenResult(Task<AwakenResult> future){return new AwakenResult(future);}
        public AwakenResult SC_awakenResult(int code, HeroPOD heroPOD){return new AwakenResult(code, heroPOD);}
        public AwakenResult SC_awakenResult(int code){return new AwakenResult(code);}
		/// <summary>
        ///  升星结果，成功时替换
        /// </summary>
        public UpStarResult SC_upStarResult(Task<UpStarResult> future){return new UpStarResult(future);}
        public UpStarResult SC_upStarResult(int code, HeroPOD heroPOD){return new UpStarResult(code, heroPOD);}
        public UpStarResult SC_upStarResult(int code){return new UpStarResult(code);}
		/// <summary>
        ///  升级技能结果，成功时加1
        /// </summary>
        public UpSkillResult SC_upSkillResult(Task<UpSkillResult> future){return new UpSkillResult(future);}
        public UpSkillResult SC_upSkillResult(int code){return new UpSkillResult(code);}
		/// <summary>
        ///  升级命轨结果
        /// </summary>
        public UpFateTrajectoryResult SC_upFateTrajectoryResult(Task<UpFateTrajectoryResult> future){return new UpFateTrajectoryResult(future);}
        public UpFateTrajectoryResult SC_upFateTrajectoryResult(int code, HeroPOD heroPOD){return new UpFateTrajectoryResult(code, heroPOD);}
        public UpFateTrajectoryResult SC_upFateTrajectoryResult(int code){return new UpFateTrajectoryResult(code);}
		/// <summary>
        ///  穿戴装备结果，其它英雄脱装备通过notifyHeroAttrs更新
        /// </summary>
        public WearEquipResult SC_wearEquipResult(Task<WearEquipResult> future){return new WearEquipResult(future);}
        public WearEquipResult SC_wearEquipResult(int code, HeroPOD heroPOD){return new WearEquipResult(code, heroPOD);}
        public WearEquipResult SC_wearEquipResult(int code){return new WearEquipResult(code);}
		/// <summary>
        /// 穿戴宠物结果，其它英雄脱装备通过notifyHeroAttrs更新
        /// </summary>
        public WearPetResult SC_wearPetResult(Task<WearPetResult> future){return new WearPetResult(future);}
        public WearPetResult SC_wearPetResult(int code, HeroPOD heroPOD){return new WearPetResult(code, heroPOD);}
        public WearPetResult SC_wearPetResult(int code){return new WearPetResult(code);}
		/// <summary>
        ///  脱装备结果
        /// </summary>
        public ClearEquipResult SC_clearEquipResult(Task<ClearEquipResult> future){return new ClearEquipResult(future);}
        public ClearEquipResult SC_clearEquipResult(int code, HeroPOD heroPOD){return new ClearEquipResult(code, heroPOD);}
        public ClearEquipResult SC_clearEquipResult(int code){return new ClearEquipResult(code);}
		/// <summary>
        ///  通知激活了英雄
        /// </summary>
		public bool SC_notifyHeroActive(ISession session, HeroPOD heroPOD){
	        return NetProtocolHelper.SendMessage(session, new NotifyHeroActive(heroPOD));
	    }
	    public void SC_notifyHeroActive_Broadcast(List<ISession> sessions, HeroPOD heroPOD){
	        NetProtocolHelper.BroadcastMessage(sessions, new NotifyHeroActive(heroPOD));
	    }
		/// <summary>
        ///  通知属性变化 -- 正常操作的情况下不通知
        /// </summary>
		public bool SC_notifyHeroAttrs(ISession session, HeroPOD heroPOD){
	        return NetProtocolHelper.SendMessage(session, new NotifyHeroAttrs(heroPOD));
	    }
	    public void SC_notifyHeroAttrs_Broadcast(List<ISession> sessions, HeroPOD heroPOD){
	        NetProtocolHelper.BroadcastMessage(sessions, new NotifyHeroAttrs(heroPOD));
	    }
#endregion

#region Messages
	public class UpLevelResult : MessageResult {
	    private HeroPOD heroPOD;
	    public UpLevelResult(Task<UpLevelResult> future): base(future) { }
		public UpLevelResult(int code): base(code) { }
		public new UpLevelResult SetDelayCall(Action delayCall) { base.SetDelayCall(delayCall); return this; }
	    internal UpLevelResult(int code, HeroPOD heroPOD){
	        this.code = code;
	        this.heroPOD = heroPOD;
	    }
        public override MessageResult GetFutureResult(Task task) { return ((Task<UpLevelResult>)task).Result; }
		public override int GetMessageId() {return NetMessageId.hero_upLevelResult;}
		public override SendPackage ToPackage() {
			SendPackage si_p = NetProtocolHelper.GetSendPackage();
			si_p.Header.Messagid = NetMessageId.hero_upLevelResult;
			si_p.StartWrite();
			SOutputStream _out = si_p.OutputStream;
			_out.Write_int(code);
			_out.Write_pod(heroPOD);
			return si_p;
		}
		public override string ToString() {
    		return "Hero.SC_upLevelResult { "
			+ "code="
			+ code
			+ ", heroPOD="
			+ heroPOD
			+" }";
		}
	}
	public class AwakenResult : MessageResult {
	    private HeroPOD heroPOD;
	    public AwakenResult(Task<AwakenResult> future): base(future) { }
		public AwakenResult(int code): base(code) { }
		public new AwakenResult SetDelayCall(Action delayCall) { base.SetDelayCall(delayCall); return this; }
	    internal AwakenResult(int code, HeroPOD heroPOD){
	        this.code = code;
	        this.heroPOD = heroPOD;
	    }
        public override MessageResult GetFutureResult(Task task) { return ((Task<AwakenResult>)task).Result; }
		public override int GetMessageId() {return NetMessageId.hero_awakenResult;}
		public override SendPackage ToPackage() {
			SendPackage si_p = NetProtocolHelper.GetSendPackage();
			si_p.Header.Messagid = NetMessageId.hero_awakenResult;
			si_p.StartWrite();
			SOutputStream _out = si_p.OutputStream;
			_out.Write_int(code);
			_out.Write_pod(heroPOD);
			return si_p;
		}
		public override string ToString() {
    		return "Hero.SC_awakenResult { "
			+ "code="
			+ code
			+ ", heroPOD="
			+ heroPOD
			+" }";
		}
	}
	public class UpStarResult : MessageResult {
	    private HeroPOD heroPOD;
	    public UpStarResult(Task<UpStarResult> future): base(future) { }
		public UpStarResult(int code): base(code) { }
		public new UpStarResult SetDelayCall(Action delayCall) { base.SetDelayCall(delayCall); return this; }
	    internal UpStarResult(int code, HeroPOD heroPOD){
	        this.code = code;
	        this.heroPOD = heroPOD;
	    }
        public override MessageResult GetFutureResult(Task task) { return ((Task<UpStarResult>)task).Result; }
		public override int GetMessageId() {return NetMessageId.hero_upStarResult;}
		public override SendPackage ToPackage() {
			SendPackage si_p = NetProtocolHelper.GetSendPackage();
			si_p.Header.Messagid = NetMessageId.hero_upStarResult;
			si_p.StartWrite();
			SOutputStream _out = si_p.OutputStream;
			_out.Write_int(code);
			_out.Write_pod(heroPOD);
			return si_p;
		}
		public override string ToString() {
    		return "Hero.SC_upStarResult { "
			+ "code="
			+ code
			+ ", heroPOD="
			+ heroPOD
			+" }";
		}
	}
	public class UpSkillResult : MessageResult {
	    public UpSkillResult(Task<UpSkillResult> future): base(future) { }
		public UpSkillResult(int code): base(code) { }
		public new UpSkillResult SetDelayCall(Action delayCall) { base.SetDelayCall(delayCall); return this; }
        public override MessageResult GetFutureResult(Task task) { return ((Task<UpSkillResult>)task).Result; }
		public override int GetMessageId() {return NetMessageId.hero_upSkillResult;}
		public override SendPackage ToPackage() {
			SendPackage si_p = NetProtocolHelper.GetSendPackage();
			si_p.Header.Messagid = NetMessageId.hero_upSkillResult;
			si_p.StartWrite();
			SOutputStream _out = si_p.OutputStream;
			_out.Write_int(code);
			return si_p;
		}
		public override string ToString() {
    		return "Hero.SC_upSkillResult { "
			+ "code="
			+ code
			+" }";
		}
	}
	public class UpFateTrajectoryResult : MessageResult {
	    private HeroPOD heroPOD;
	    public UpFateTrajectoryResult(Task<UpFateTrajectoryResult> future): base(future) { }
		public UpFateTrajectoryResult(int code): base(code) { }
		public new UpFateTrajectoryResult SetDelayCall(Action delayCall) { base.SetDelayCall(delayCall); return this; }
	    internal UpFateTrajectoryResult(int code, HeroPOD heroPOD){
	        this.code = code;
	        this.heroPOD = heroPOD;
	    }
        public override MessageResult GetFutureResult(Task task) { return ((Task<UpFateTrajectoryResult>)task).Result; }
		public override int GetMessageId() {return NetMessageId.hero_upFateTrajectoryResult;}
		public override SendPackage ToPackage() {
			SendPackage si_p = NetProtocolHelper.GetSendPackage();
			si_p.Header.Messagid = NetMessageId.hero_upFateTrajectoryResult;
			si_p.StartWrite();
			SOutputStream _out = si_p.OutputStream;
			_out.Write_int(code);
			_out.Write_pod(heroPOD);
			return si_p;
		}
		public override string ToString() {
    		return "Hero.SC_upFateTrajectoryResult { "
			+ "code="
			+ code
			+ ", heroPOD="
			+ heroPOD
			+" }";
		}
	}
	public class WearEquipResult : MessageResult {
	    private HeroPOD heroPOD;
	    public WearEquipResult(Task<WearEquipResult> future): base(future) { }
		public WearEquipResult(int code): base(code) { }
		public new WearEquipResult SetDelayCall(Action delayCall) { base.SetDelayCall(delayCall); return this; }
	    internal WearEquipResult(int code, HeroPOD heroPOD){
	        this.code = code;
	        this.heroPOD = heroPOD;
	    }
        public override MessageResult GetFutureResult(Task task) { return ((Task<WearEquipResult>)task).Result; }
		public override int GetMessageId() {return NetMessageId.hero_wearEquipResult;}
		public override SendPackage ToPackage() {
			SendPackage si_p = NetProtocolHelper.GetSendPackage();
			si_p.Header.Messagid = NetMessageId.hero_wearEquipResult;
			si_p.StartWrite();
			SOutputStream _out = si_p.OutputStream;
			_out.Write_int(code);
			_out.Write_pod(heroPOD);
			return si_p;
		}
		public override string ToString() {
    		return "Hero.SC_wearEquipResult { "
			+ "code="
			+ code
			+ ", heroPOD="
			+ heroPOD
			+" }";
		}
	}
	public class WearPetResult : MessageResult {
	    private HeroPOD heroPOD;
	    public WearPetResult(Task<WearPetResult> future): base(future) { }
		public WearPetResult(int code): base(code) { }
		public new WearPetResult SetDelayCall(Action delayCall) { base.SetDelayCall(delayCall); return this; }
	    internal WearPetResult(int code, HeroPOD heroPOD){
	        this.code = code;
	        this.heroPOD = heroPOD;
	    }
        public override MessageResult GetFutureResult(Task task) { return ((Task<WearPetResult>)task).Result; }
		public override int GetMessageId() {return NetMessageId.hero_wearPetResult;}
		public override SendPackage ToPackage() {
			SendPackage si_p = NetProtocolHelper.GetSendPackage();
			si_p.Header.Messagid = NetMessageId.hero_wearPetResult;
			si_p.StartWrite();
			SOutputStream _out = si_p.OutputStream;
			_out.Write_int(code);
			_out.Write_pod(heroPOD);
			return si_p;
		}
		public override string ToString() {
    		return "Hero.SC_wearPetResult { "
			+ "code="
			+ code
			+ ", heroPOD="
			+ heroPOD
			+" }";
		}
	}
	public class ClearEquipResult : MessageResult {
	    private HeroPOD heroPOD;
	    public ClearEquipResult(Task<ClearEquipResult> future): base(future) { }
		public ClearEquipResult(int code): base(code) { }
		public new ClearEquipResult SetDelayCall(Action delayCall) { base.SetDelayCall(delayCall); return this; }
	    internal ClearEquipResult(int code, HeroPOD heroPOD){
	        this.code = code;
	        this.heroPOD = heroPOD;
	    }
        public override MessageResult GetFutureResult(Task task) { return ((Task<ClearEquipResult>)task).Result; }
		public override int GetMessageId() {return NetMessageId.hero_clearEquipResult;}
		public override SendPackage ToPackage() {
			SendPackage si_p = NetProtocolHelper.GetSendPackage();
			si_p.Header.Messagid = NetMessageId.hero_clearEquipResult;
			si_p.StartWrite();
			SOutputStream _out = si_p.OutputStream;
			_out.Write_int(code);
			_out.Write_pod(heroPOD);
			return si_p;
		}
		public override string ToString() {
    		return "Hero.SC_clearEquipResult { "
			+ "code="
			+ code
			+ ", heroPOD="
			+ heroPOD
			+" }";
		}
	}
	public class NotifyHeroActive : MessageNotify {
		private HeroPOD heroPOD;
		public NotifyHeroActive(HeroPOD heroPOD) {
		    this.heroPOD = heroPOD;
		}
		public override int GetMessageId() {return NetMessageId.hero_notifyHeroActive;}
		public override SendPackage ToPackage() {
			SendPackage si_p = NetProtocolHelper.GetSendPackage();
			si_p.Header.Messagid = NetMessageId.hero_notifyHeroActive;
			si_p.StartWrite();
			SOutputStream _out = si_p.OutputStream;
			_out.Write_pod(heroPOD);
			return si_p;
		}
		public override string ToString() {
			return "Hero.SC_notifyHeroActive { "
			+ "heroPOD="
			+ heroPOD
			+" }";
		}
	}
	public class NotifyHeroAttrs : MessageNotify {
		private HeroPOD heroPOD;
		public NotifyHeroAttrs(HeroPOD heroPOD) {
		    this.heroPOD = heroPOD;
		}
		public override int GetMessageId() {return NetMessageId.hero_notifyHeroAttrs;}
		public override SendPackage ToPackage() {
			SendPackage si_p = NetProtocolHelper.GetSendPackage();
			si_p.Header.Messagid = NetMessageId.hero_notifyHeroAttrs;
			si_p.StartWrite();
			SOutputStream _out = si_p.OutputStream;
			_out.Write_pod(heroPOD);
			return si_p;
		}
		public override string ToString() {
			return "Hero.SC_notifyHeroAttrs { "
			+ "heroPOD="
			+ heroPOD
			+" }";
		}
	}
	private class UpLevelRequest : IReceiveMessage
    {
		internal int heroCid;
		internal Dictionary<int, int> items;
        public void FromPackage(ReceivePackage package)
		{
			SInputStream _in = package.InputStream;
            heroCid = _in.HasRemaining() ? _in.Read_int() : default;
            items = _in.HasRemaining() ? _in.Read_map_int_int() : default;
		}
        public int GetMessageId() { return NetMessageId.hero_upLevel; }
        public override string ToString()
        {
            return "Hero.upLevel"+ ", heroCid="+ heroCid+ ", items="+ items.ToString<int, int>();
        }
    }
	private class AwakenRequest : IReceiveMessage
    {
		internal int heroCid;
        public void FromPackage(ReceivePackage package)
		{
			SInputStream _in = package.InputStream;
            heroCid = _in.HasRemaining() ? _in.Read_int() : default;
		}
        public int GetMessageId() { return NetMessageId.hero_awaken; }
        public override string ToString()
        {
            return "Hero.awaken"+ ", heroCid="+ heroCid;
        }
    }
	private class UpStarRequest : IReceiveMessage
    {
		internal int heroCid;
        public void FromPackage(ReceivePackage package)
		{
			SInputStream _in = package.InputStream;
            heroCid = _in.HasRemaining() ? _in.Read_int() : default;
		}
        public int GetMessageId() { return NetMessageId.hero_upStar; }
        public override string ToString()
        {
            return "Hero.upStar"+ ", heroCid="+ heroCid;
        }
    }
	private class UpSkillRequest : IReceiveMessage
    {
		internal int heroCid;
		internal int skillCid;
        public void FromPackage(ReceivePackage package)
		{
			SInputStream _in = package.InputStream;
            heroCid = _in.HasRemaining() ? _in.Read_int() : default;
            skillCid = _in.HasRemaining() ? _in.Read_int() : default;
		}
        public int GetMessageId() { return NetMessageId.hero_upSkill; }
        public override string ToString()
        {
            return "Hero.upSkill"+ ", heroCid="+ heroCid+ ", skillCid="+ skillCid;
        }
    }
	private class UpFateTrajectoryRequest : IReceiveMessage
    {
		internal int heroCid;
        public void FromPackage(ReceivePackage package)
		{
			SInputStream _in = package.InputStream;
            heroCid = _in.HasRemaining() ? _in.Read_int() : default;
		}
        public int GetMessageId() { return NetMessageId.hero_upFateTrajectory; }
        public override string ToString()
        {
            return "Hero.upFateTrajectory"+ ", heroCid="+ heroCid;
        }
    }
	private class WearEquipRequest : IReceiveMessage
    {
		internal int heroCid;
		internal int slot;
		internal long equipId;
        public void FromPackage(ReceivePackage package)
		{
			SInputStream _in = package.InputStream;
            heroCid = _in.HasRemaining() ? _in.Read_int() : default;
            slot = _in.HasRemaining() ? _in.Read_int() : default;
            equipId = _in.HasRemaining() ? _in.Read_long() : default;
		}
        public int GetMessageId() { return NetMessageId.hero_wearEquip; }
        public override string ToString()
        {
            return "Hero.wearEquip"+ ", heroCid="+ heroCid+ ", slot="+ slot+ ", equipId="+ equipId;
        }
    }
	private class WearPetRequest : IReceiveMessage
    {
		internal int heroCid;
		internal long petId;
        public void FromPackage(ReceivePackage package)
		{
			SInputStream _in = package.InputStream;
            heroCid = _in.HasRemaining() ? _in.Read_int() : default;
            petId = _in.HasRemaining() ? _in.Read_long() : default;
		}
        public int GetMessageId() { return NetMessageId.hero_wearPet; }
        public override string ToString()
        {
            return "Hero.wearPet"+ ", heroCid="+ heroCid+ ", petId="+ petId;
        }
    }
	private class ClearEquipRequest : IReceiveMessage
    {
		internal int heroCid;
        public void FromPackage(ReceivePackage package)
		{
			SInputStream _in = package.InputStream;
            heroCid = _in.HasRemaining() ? _in.Read_int() : default;
		}
        public int GetMessageId() { return NetMessageId.hero_clearEquip; }
        public override string ToString()
        {
            return "Hero.clearEquip"+ ", heroCid="+ heroCid;
        }
    }
	}
#endregion
}